package cn.qyd.javathread;

public class DemoTest {
    public static void main(String[] args) {
        Thread myThread = new MyThreadDemo();
        myThread.start() ;
        System.out.println("将running值改为false1");
        if(myThread instanceof MyThreadDemo) {
            System.out.println("将running值改为false2");
            ((MyThreadDemo) myThread).stopThread();
        }
        System.out.println("将running值改为false3");
    }
}
